package com.itmuch.cloud.microserviceconsumermovie.feign;

import com.itmuch.cloud.microserviceconsumermovie.entity.User;
import com.itmuch.config.FeignAutoConfiguration1;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignAutoConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/********************************************************
 *@Desc: feign客户端使用
 *  使用feign自己的注解
 *@Date: 2017/12/20 14:00
 ********************************************************/
@FeignClient(name = "microservice-provider-user", configuration = FeignAutoConfiguration1.class)
public interface UserFeignClient {

    @RequestLine("GET /simple/{id}")
    public User findById(@Param("id") Long id);
}
